package com.liy.supercloud.ssoclient;

import com.liy.supercloud.ssoclient.security.jwt.UserAuthConfig;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.client.RestTemplate;


@Configuration
@EnableScheduling
@EnableDiscoveryClient
@EnableFeignClients(basePackages = {"com.das.supercloud.ssoclient.feign"})
@ComponentScan({"com.liy.supercloud.ssoclient"})
public class AuthorizationConfiguration {

    @Bean
    UserAuthConfig getUserAuthConfig() {
        return new UserAuthConfig();
    }

    @Bean
    @LoadBalanced
    public RestTemplate getRestTemplate() {
        return new RestTemplate();
    }
}
